import request from '@/utils/request.ts'


const PREFIX = '/user'
const POST_URL = '/'


export const addOrUpdateUser = async (data: any) => {
    return await request.post(PREFIX + POST_URL, data)
}
export const reqSetUserRole = (data: any) => {
    return request.post(PREFIX + POST_URL, data)
}


export const reqRemoveUser = (id: number) => {
    return request.delete(PREFIX + POST_URL + id)
}


export const reqSelectUser = (id: number) => {
    return request.get(PREFIX + POST_URL + id)

}
// reqSetUserRole
export const reqAllRole = (data: any) => {
    return request.get(PREFIX + POST_URL)

}
// reqAllRole
export const reqUserRole = () => {

}
// reqAddOrUpdateUser
export const reqUserList = () => {

}
export const reqUserInfo = () => {
    return request.get(PREFIX)
}

export const reqAddOrUpdateUser = async (data: any) => {
    return await request.post(PREFIX + POST_URL, data)

}